GUI on Amiga today: Magic User Interface
Written by kas1e, 02.02.2012

Today "Amiga" means something different than in the days of Commodore. A bunch of new OSes continue the ideas of the good, old AmigaOS (AmigaOS4, MorphOS and AROS) on the PPC and even x86 hardware, and with keeping the AOS3.x API they are trying to be modern in different aspects. Of course they can't be compared with let's say WinXP/7, or even with MacOS by the amount of software and with all the modern stuff like good old memory protection, normal resource tracking and co, but still, they try :)

The splitting in the different "camps" adds a bit of pain for Amiga programmers: they are forced to choose between OSes that are almost the same but still different, with the same AmigaOS3 API, but with different GUI toolkits and small differences here and here. And while core OS developers work only on the OS of their choice, 3rd party programmers usually want to make their apps work on all Amiga-like OSes. There are a lot of opportunities for that, and it is even possible to make apps cross-platform, not only for Amiga, like by using SDL libs, Allegro, OpenGL and co. But then you lose the unique properties of the Amiga OSes, with all their differences compared with other OSes, like datatypes, unique GUI toolkits, way of working with native AOS3 API and so on. And there is one possible GUI toolkit which is unique, AmigaOS specific, but still available on all Amiga-like OSes, and that is MUI.

Lately I was involved in the porting of the WebKit-based browser from MorphOS to AmigaOS4 done by Fabien Coeurjoly called Odyssey, the GUI of which is based on the MUI4. But until recently we had only MUI3.9, and because of that I jump into the hole with all the problems and differences beetwen different Amiga-like oses and their GUI toolkits. I think it will be interesting to some of you to know how all of this is structured and what it looks like today.

So what is MUI? MUI (magic user interface) is a tookit which gives you the ability to write GUI based programms more easily. It's just a set of libraries and classes which makes the life of programmers easy. The first versions of MUI was born in 1992, and of course, as any first version of any software it was not so big by features, options and without too many classes (not talking about 3rd party classes).

As any original Amiga software MUI comes with a set of autodocs (Amiga-style documentation) where you can check how APIs works, how they react, what they return and all the usual stuff. With MUI itself comes a very nice guide called "MUI programming tutorial", which however is a bit outdated, as it was written in the days of AmigaOS3 and mostly covers the old MUI3. Currently one of the best MUI tutorials which includes all the latest features of MUI done by the MorphOS programmer (as until recently MUI4 was present on MorphOS only) Grzegorz "Krashan" Kraszewski can be read here: Magic User Interface Programming

Initially the main MUI developer was Stefan Stuntz, and the most popular version was MUI3.8, just because that was last version released for AmigaOS3, and some years passed before AmigaOS4 and MorphOS got the level which they have with the MUI and changes in it. Because of that, users and programmers who still use AmigaOS3 think that MUI for all the platforms will be always stuck on the version 3.8. Today, after 15 years, the old version of MUI of course looks pretty retro and "outdated" - just check the screens and compare MUI3 from AmigaOS3 with MUI4 on MorphOS:

Until the year 2000 everything was clear with MUI. The development made progress step by step. Those years were also when Amiga users were in hope to get a new AmigaOS (there were some unclear promises), while MorphOS also progressed nicely and so it wasn't so clear what the MUI author should support: still AmigaOS, or swith to MorphOS? Because of all the problems there is no MUI4 for AmigaOS4 yet until today - the latest version for AmigaOS4 is MUI3.9 (the differences between this and MUI3.8, which is available for AmigaOS3, only concern the removal of some bad bugs, small changes in design, but it's still the same MUI3). But on MorphOS new versions of MUI4 happens to arrive, and until recently MorphOS was the only Amiga-like OS for which the latest vesion of MUI (MUI4) was available. For some reason the AOS4 version of MUI4 was not continually updated while the version for MorphOS made progress, and so the AOS4 developer who works on MUI updates (Thore Bockelmann) was forced to re-implement a lot of stuff from scratch (like dynamic list titles, group titles, font handling, new classes such as process, lamp, title, rawimage and about) to make MUI on AOS4 have the same features as on MorphOS. That wasn't an easy job, as all of this was re-implemented just based on the includes, autodocs and tests.

Today the MUI for AmigaOS4 has almost all the features MUI4 on MorphOS has: truecolor gradients, different themes and images, fancy bitmaps, list titles (like in NList), and all the tasty features which made MUI4 so good in Amiga land. In the current days I myself do some testing of beta-MUI on AmigaOS4, and just for fun I recreated the default MorphOS theme called "Ferox", checked the screens, one with MUI4 on MorphOS with the default ferox theme, and one with MUI4 on AmigaOS4, with the same kind of theme, which can't be default on AmigaOS4 (as it's copyrighted for MorphOS only):

Sure you can see some differences in design, but the point of the screenshots is to show that on AmigaOS4 MUI now has the same set of features as MUI4 on MorphOS. So, at least now we have two modern Amiga OSes which have MUI with all the latest stuff. But what about the 3rd (AROS)? I have not mentioned AROS till now, but that is just because that MUI on AROS is not the same MUI as done by Stunzi. On AROS there is an open source implementation of MUI called ZUNE, but the sad point is that currently ZUNE in some areas even lacks features of MUI3.8, not to speak about MUI4. But disregarding bugs and some limitations, it already works, and AROS users live with it:

Those limitations and bugs of ZUNE in comparison with MUI4 on MorphOS and AmigaOS4 do not have the effect that nothing works. Some versions of OWB (also webkit based browser) work, as well as IRC clients, image editors (such as Lunapaint), different MUI classes, and co. The big advantage of ZUNE is that it's open-source, which means that there are no legal and copyright problems, everything is done from scratch and developers do with it all they want, and when they want. Still, till the last moment ZUNE wasn't in big development, just some minor fixes here and there, and lately one of the AROS developers (Neil) decided to work on the goal to make ZUNE on the level of MUI3.8 firstly (so it should be 1:1, without any differences), and then, more work can be done to reach the level of MUI4.

So, what we the final conclusions, you may ask?

- MUI4 is done for MorphOS and AmigaOS4 - on those OSes the development of MUI is going on all the time and reaches some good level.

- ZUNE for AROS - opensource realisation of MUI3.8

- MUI3.x for old versions of AmigaOS3.x - that is for the retro fans, because evolution of MUI3 is MUI4. But for the sake of truth, new classes which are released for MUI, released for all the OSes, and that includes MUI3.8 as well.

Can we say that if a programmer wants to write some app with a GUI which he wants to port for every Amiga or Amiga-like OS that MUI is the only choice? The answer is yes. Of course we talk about unique and native Amiga GUI, because as pointed out SDL, OpenGL and co can be used as well.

For a long time the core developers of AmigaOS4 (Hyperion) tried to spread the word that MUI is not a good choice and that Reaction is the future of AmigaOS (official GUI toolkit of AmigaOS4), but time and practice have shown that MUI is the only fully featured GUI toolkit which can be used on all the OSes. Yes, for the sake of truth we should say that Reaction is being developed and might reach the level of MUI, but as we talk about a crossplatform solution beetwen all the Amiga OSes, Reaction does not help a lot, as its only present on AmigaOS4.

As usual it is up to the programmers to decide what to choose, but if you want to support all Amiga and alike OSes, MUI is the only choice.

kas1e